﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RMS.MasterPages
{
    public partial class ModlingMasterPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void RptMenus_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Repeater links = (Repeater)e.Item.FindControl("rptLinks");
            SiteMapNode sNode = (System.Web.SiteMapNode)e.Item.DataItem;
            System.Web.SiteMapNodeCollection childNodes = sNode.ChildNodes;
            if (childNodes != null && childNodes.Count > 0)
            {
                links.DataSourceID = null;
                links.DataSource = childNodes;
                links.DataBind();
            }
        }
    }
}